package com.feng.zhihao.apigeteway.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ChannelInterfaceId entity. @author MyEclipse Persistence Tools
 */
@Embeddable

public class ChannelInterfaceId implements java.io.Serializable {

	// Fields

	private String channelId;
	private String interfaceId;

	// Constructors

	/** default constructor */
	public ChannelInterfaceId() {
	}

	/** full constructor */
	public ChannelInterfaceId(String channelId, String interfaceId) {
		this.channelId = channelId;
		this.interfaceId = interfaceId;
	}

	// Property accessors

	@Column(name = "CHANNEL_ID", nullable = false, length = 36)

	public String getChannelId() {
		return this.channelId;
	}

	public void setChannelId(String channelId) {
		this.channelId = channelId;
	}

	@Column(name = "INTERFACE_ID", nullable = false, length = 36)

	public String getInterfaceId() {
		return this.interfaceId;
	}

	public void setInterfaceId(String interfaceId) {
		this.interfaceId = interfaceId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ChannelInterfaceId))
			return false;
		ChannelInterfaceId castOther = (ChannelInterfaceId) other;

		return ((this.getChannelId() == castOther.getChannelId()) || (this.getChannelId() != null
				&& castOther.getChannelId() != null && this.getChannelId().equals(castOther.getChannelId())))
				&& ((this.getInterfaceId() == castOther.getInterfaceId())
						|| (this.getInterfaceId() != null && castOther.getInterfaceId() != null
								&& this.getInterfaceId().equals(castOther.getInterfaceId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getChannelId() == null ? 0 : this.getChannelId().hashCode());
		result = 37 * result + (getInterfaceId() == null ? 0 : this.getInterfaceId().hashCode());
		return result;
	}

}